<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class CollectArticle extends Model
{
    //
    static function getList($category = '中医减肥',$row = 10, $page=0)
    {
        $data = CollectArticle::where('category', $category)
            ->select('id', 'title', 'cover', 'view', 'created_at')
            ->where('status', 1)->orderBy('view', 'desc')->orderBy('updated_at', 'desc')->offset($page * 10)->limit($row)->get();
        return $data;
    }
}
